fs = import('fs')
version=fs.read('../VERSION').strip()

compiler = meson.get_compiler('c')
conf_data = configuration_data()
conf_data.set('version', version)
conf_data.set('compiler', compiler.version())
configure_file(input: 'build.h.in',
               output: 'build.h',
               configuration: conf_data)

sources = [
  'allocate.c',
  'analyze.c',
  'ands.c',
  'application.c',
  'arena.c',
  'assign.c',
  'averages.c',
  'backbone.c',
  'backtrack.c',
  'build.c',
  'bump.c',
  'check.c',
  'clause.c',
  'collect.c',
  'colors.c',
  'compact.c',
  'config.c',
  'decide.c',
  'deduce.c',
  'definition.c',
  'dense.c',
  'dump.c',
  'eliminate.c',
  'equivalences.c',
  'error.c',
  'extend.c',
  'file.c',
  'flags.c',
  'format.c',
  'forward.c',
  'gates.c',
  'handle.c',
  'heap.c',
  'ifthenelse.c',
  'import.c',
  'internal.c',
  'kimits.c',
  'kitten.c',
  'learn.c',
  'logging.c',
  'minimize.c',
  'mode.c',
  'options.c',
  'parse.c',
  'phases.c',
  'print.c',
  'probe.c',
  'profile.c',
  'promote.c',
  'proof.c',
  'propbeyond.c',
  'propdense.c',
  'proprobe.c',
  'propsearch.c',
  'queue.c',
  'reduce.c',
  'reluctant.c',
  'rephase.c',
  'report.c',
  'resize.c',
  'resolve.c',
  'resources.c',
  'restart.c',
  'search.c',
  'shrink.c',
  'smooth.c',
  'sort.c',
  'stack.c',
  'statistics.c',
  'strengthen.c',
  'substitute.c',
  'sweep.c',
  'terminate.c',
  'trail.c',
  'utilities.c',
  'vector.c',
  'vivify.c',
  'walk.c',
  'warmup.c',
  'watch.c',
  'weaken.c',
  'witness.c',
]

kissat_lib = library('kissat', sources: sources)
kissat_dep = declare_dependency(
                  include_directories: include_directories('.'),
                  link_with: kissat_lib)

